from flask import Flask
import os

from flask_sqlalchemy import SQLAlchemy
from flaskAdminApp.settings import config
from flask_cors import *

app = Flask(__name__)
config_name = os.getenv('FLASK_CONFIG','production')
app.config.from_object(config[config_name])
db = SQLAlchemy(app)

from flaskAdminApp.api.admin import admin

app.register_blueprint(admin,url_prefix='/api/admin')

CORS(app,supports_credentials=True)